Skip to content

[V0 Deprecation] Remove code related to per-request logits processors#34400

Merged
DarkLight1337 merged 8 commits intovllm-project:mainfrom
DarkLight1337:rm-sampling-logits-processors
Feb 12, 2026
Merged

[V0 Deprecation] Remove code related to per-request logits processors#34400
DarkLight1337 merged 8 commits intovllm-project:mainfrom
DarkLight1337:rm-sampling-logits-processors

Conversation

@DarkLight1337
Copy link
Copy Markdown
Member

@DarkLight1337 DarkLight1337 commented Feb 12, 2026

Purpose

Removed the following as they're not valid in V1:

  • ModelConfig.logits_processor_pattern
  • SamplingParams.logits_processors
  • ChatCompletionRequest.logits_processor
  • CompletionRequest.logits_processor

cc @afeldman-nm

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to remove per-request logits processors, which are deprecated in V1. The changes are spread across configuration, engine arguments, sampling parameters, and OpenAI protocol files to remove logits_processor_pattern and per-request logits_processors. The changes are generally correct and align with the goal. However, I've found that the removal is incomplete in a few places. Specifically, the logits_processors attribute is still present in SamplingParams, EngineArgs, and ModelConfig classes, which could lead to silent failures or confusion. I've left detailed comments on how to address this.

I am having trouble creating individual review comments. Click here to see my feedback.

vllm/engine/arg_utils.py (1329)

high

This change, along with others in this PR, effectively disables engine-level logits_processors. However, the logits_processors attribute still exists in EngineArgs and ModelConfig, and is accepted by LLM.__init__. To avoid confusion and silent failures, these should be removed as well if they are no longer intended to be used.

vllm/sampling_params.py (458-462)

high

While this check is being removed, the logits_processors attribute is still defined on the SamplingParams class (line 212), and as an argument to from_optional (line 280). To fully complete the deprecation and prevent users from thinking the parameter is still effective, the attribute should be removed from the class definition and method signatures entirely. Leaving it can lead to silent failures and confusion.

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337
Copy link
Copy Markdown
Member Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively removes the deprecated per-request logits processors, which simplifies the API and codebase. The changes are clean and consistent across the modified files. However, I've identified a critical issue where model-level logits processors, configured via CLI arguments, are no longer being applied due to a missing parameter in the ModelConfig instantiation. This appears to be an unintended side effect of the refactoring. My review includes a specific comment and suggestion to fix this.

Comment thread vllm/engine/arg_utils.py
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337
Copy link
Copy Markdown
Member Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively removes the deprecated per-request logits processors feature. The changes are comprehensive, touching configuration, argument parsing, API protocols, serving logic, and tests. Key removals include SamplingParams.logits_processors, ModelConfig.logits_processor_pattern, and the corresponding fields in ChatCompletionRequest and CompletionRequest.

I appreciate the thoroughness of this refactoring. The removal of related tests and mock configurations is clean. A notable improvement is the relocation of the validation logic for model-level logits processors from the serving layer into SamplingParams.verify(), which centralizes the logic and correctly uses a local import to prevent circular dependencies.

Overall, the changes are well-implemented, improve code clarity by removing deprecated code, and I see no issues with the implementation.

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337 DarkLight1337 merged commit fb455ed into vllm-project:main Feb 12, 2026
55 checks passed
@DarkLight1337 DarkLight1337 deleted the rm-sampling-logits-processors branch February 12, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants